![]() |
PATH![]() |
This section describes the changes you should be aware of if you are working with code that supported the version 1.0 parameter block in USB.h and you want to take advantage of the features in version 1.1 of the Mac OS USB software.
The USBPB parameter block structure has been converted to include unions that provide support for isochronous transfers. The change is binary compatible (you can keep the same kUSBCurrentVersion value), but it is necessary to make changes to existing source code in order to use the version 1.1 USB.h file.
At the simplest level, the necessary changes can be made by doing a search and replace of the following strings in your code:
usbBMRequestType | usb.cntl.BMRequestType |
usbBRequest | usb.cntl.BRequest |
usbWValue | usb.cntl.WValue |
usbWIndex | usb.cntl.WIndex |
To aid with the conversion process, macros with the substitutions are available in the version 1.1 USB.h file. To use the macros, add a define for OLDUSBNAMES before including USB.h. It is recommended that you make the actual string changes in the source, because the macro facility is not guaranteed to be available in later versions of the USB.h file.
The USBClassDriverPlugInDispatchTable has changed in version 1.1. If the version of USBClassDriverPluginDispatchTable is set to kUSBClassDriverPluginVersion it indicates that USBDriverNotifyProcPtr has the following prototype:
OSStatus USBDriverNotifyProc(USBDriverNotification notification, void *pointer,
Uint32 refcon);
Previous | Back Up One Level | Next |